# -*- coding: utf-8 -*- 

###########################################################################
## Python code generated with wxFormBuilder (version Jun 17 2015)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################

import wx
import wx.xrc

###########################################################################
## Class main_frame
###########################################################################

class main_frame ( wx.Frame ):
	
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Main Frame", pos = wx.DefaultPosition, size = wx.Size( 856,685 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
		self.SetBackgroundColour( wx.Colour( 231, 253, 28 ) )
		
		power_stress_gbSizer = wx.GridBagSizer( 0, 0 )
		power_stress_gbSizer.SetFlexibleDirection( wx.BOTH )
		power_stress_gbSizer.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.test_name_panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.Size( 100,100 ), wx.TAB_TRAVERSAL )
		self.test_name_panel.SetBackgroundColour( wx.Colour( 255, 255, 128 ) )
		
		test_name_bsizer = wx.BoxSizer( wx.VERTICAL )
		
		self.test_name_label = wx.StaticText( self.test_name_panel, wx.ID_ANY, u"Power Stress Test", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE )
		self.test_name_label.Wrap( -1 )
		self.test_name_label.SetFont( wx.Font( 28, 70, 90, 92, False, wx.EmptyString ) )
		
		test_name_bsizer.Add( self.test_name_label, 0, wx.ALIGN_CENTER|wx.ALL, 10 )
		
		
		self.test_name_panel.SetSizer( test_name_bsizer )
		self.test_name_panel.Layout()
		power_stress_gbSizer.Add( self.test_name_panel, wx.GBPosition( 0, 0 ), wx.GBSpan( 0, 2 ), wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND|wx.LEFT|wx.RIGHT, 5 )
		
		self.osc_panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.Size( 200,200 ), wx.TAB_TRAVERSAL )
		self.osc_panel.SetBackgroundColour( wx.Colour( 5, 209, 169 ) )
		
		osc_gbSizer = wx.GridBagSizer( 0, 0 )
		osc_gbSizer.SetFlexibleDirection( wx.BOTH )
		osc_gbSizer.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.osc_ip_label = wx.StaticText( self.osc_panel, wx.ID_ANY, u"OSC IP", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.osc_ip_label.Wrap( -1 )
		self.osc_ip_label.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.osc_ip_label.SetMinSize( wx.Size( 150,30 ) )
		
		osc_gbSizer.Add( self.osc_ip_label, wx.GBPosition( 0, 0 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.osc_ip_text = wx.TextCtrl( self.osc_panel, wx.ID_ANY, u"172.22.8.202#", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.osc_ip_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.osc_ip_text.SetMinSize( wx.Size( 150,22 ) )
		
		osc_gbSizer.Add( self.osc_ip_text, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.osc_picture_path_label = wx.StaticText( self.osc_panel, wx.ID_ANY, u"Picture Path", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.osc_picture_path_label.Wrap( -1 )
		self.osc_picture_path_label.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.osc_picture_path_label.SetMinSize( wx.Size( 150,30 ) )
		
		osc_gbSizer.Add( self.osc_picture_path_label, wx.GBPosition( 0, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.osc_picture_path_text = wx.TextCtrl( self.osc_panel, wx.ID_ANY, u"C:\\ATE", wx.DefaultPosition, wx.DefaultSize, wx.TE_READONLY )
		self.osc_picture_path_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.osc_picture_path_text.SetMinSize( wx.Size( 150,22 ) )
		
		osc_gbSizer.Add( self.osc_picture_path_text, wx.GBPosition( 0, 3 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.address_mode_label = wx.StaticText( self.osc_panel, wx.ID_ANY, u"Address Mode", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.address_mode_label.Wrap( -1 )
		self.address_mode_label.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.address_mode_label.SetMinSize( wx.Size( 150,30 ) )
		
		osc_gbSizer.Add( self.address_mode_label, wx.GBPosition( 1, 0 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.address_mode_text = wx.TextCtrl( self.osc_panel, wx.ID_ANY, u"ADDr7", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.address_mode_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.address_mode_text.SetMinSize( wx.Size( 150,22 ) )
		
		osc_gbSizer.Add( self.address_mode_text, wx.GBPosition( 1, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.osc_voltage_mode_label = wx.StaticText( self.osc_panel, wx.ID_ANY, u"Voltage Mode", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.osc_voltage_mode_label.Wrap( -1 )
		self.osc_voltage_mode_label.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.osc_voltage_mode_label.SetMinSize( wx.Size( 150,30 ) )
		
		osc_gbSizer.Add( self.osc_voltage_mode_label, wx.GBPosition( 1, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.osc_voltage_mode_text = wx.TextCtrl( self.osc_panel, wx.ID_ANY, u"3", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.osc_voltage_mode_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.osc_voltage_mode_text.SetToolTipString( u"Unit: v" )
		self.osc_voltage_mode_text.SetMinSize( wx.Size( 150,22 ) )
		
		osc_gbSizer.Add( self.osc_voltage_mode_text, wx.GBPosition( 1, 3 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		
		self.osc_panel.SetSizer( osc_gbSizer )
		self.osc_panel.Layout()
		power_stress_gbSizer.Add( self.osc_panel, wx.GBPosition( 1, 0 ), wx.GBSpan( 1, 1 ), wx.ALL|wx.EXPAND, 5 )
		
		self.excel_panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.Size( 200,200 ), wx.TAB_TRAVERSAL )
		self.excel_panel.SetBackgroundColour( wx.Colour( 5, 209, 169 ) )
		
		excel_gbSizer = wx.GridBagSizer( 0, 0 )
		excel_gbSizer.SetFlexibleDirection( wx.BOTH )
		excel_gbSizer.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.excel_path_label = wx.StaticText( self.excel_panel, wx.ID_ANY, u"Excel Path", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.excel_path_label.Wrap( -1 )
		self.excel_path_label.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.excel_path_label.SetMinSize( wx.Size( 150,30 ) )
		
		excel_gbSizer.Add( self.excel_path_label, wx.GBPosition( 0, 0 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.excel_path_text = wx.TextCtrl( self.excel_panel, wx.ID_ANY, u"enter 键选择 excel", wx.DefaultPosition, wx.DefaultSize, wx.TE_PROCESS_ENTER|wx.TE_RIGHT )
		self.excel_path_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.excel_path_text.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.excel_path_text, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.excel_sheet_label = wx.StaticText( self.excel_panel, wx.ID_ANY, u"Excel Sheet", wx.DefaultPosition, wx.Size( -1,-1 ), 0 )
		self.excel_sheet_label.Wrap( -1 )
		self.excel_sheet_label.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.excel_sheet_label.SetMinSize( wx.Size( 150,30 ) )
		
		excel_gbSizer.Add( self.excel_sheet_label, wx.GBPosition( 0, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.excel_sheet_text = wx.TextCtrl( self.excel_panel, wx.ID_ANY, u"4", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.excel_sheet_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.excel_sheet_text.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.excel_sheet_text, wx.GBPosition( 0, 3 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.test_row = wx.StaticText( self.excel_panel, wx.ID_ANY, u"Test Row", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.test_row.Wrap( -1 )
		self.test_row.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.test_row.SetMinSize( wx.Size( 150,30 ) )
		
		excel_gbSizer.Add( self.test_row, wx.GBPosition( 1, 0 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.test_row_text = wx.TextCtrl( self.excel_panel, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		self.test_row_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.test_row_text.SetToolTipString( u"间隔的行用逗号 [ , ] 分隔每一个行号\n\n相邻的多行用分隔符 [ - ] 分隔\n\n例：3，5-10，22" )
		self.test_row_text.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.test_row_text, wx.GBPosition( 1, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.start_column_label = wx.StaticText( self.excel_panel, wx.ID_ANY, u"Start Column", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.start_column_label.Wrap( -1 )
		self.start_column_label.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.start_column_label.SetMinSize( wx.Size( 150,30 ) )
		
		excel_gbSizer.Add( self.start_column_label, wx.GBPosition( 1, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.start_column_text = wx.TextCtrl( self.excel_panel, wx.ID_ANY, u"4", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.start_column_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.start_column_text.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.start_column_text, wx.GBPosition( 1, 3 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.picture_start_row_label = wx.StaticText( self.excel_panel, wx.ID_ANY, u"Picture Start Row", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.picture_start_row_label.Wrap( -1 )
		self.picture_start_row_label.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.picture_start_row_label.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.picture_start_row_label, wx.GBPosition( 2, 0 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.picture_start_row_text = wx.TextCtrl( self.excel_panel, wx.ID_ANY, u"1", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.picture_start_row_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.picture_start_row_text.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.picture_start_row_text, wx.GBPosition( 2, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.specified_measures_label = wx.StaticText( self.excel_panel, wx.ID_ANY, u"Specified Measures", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.specified_measures_label.Wrap( -1 )
		self.specified_measures_label.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.specified_measures_label.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.specified_measures_label, wx.GBPosition( 2, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.specified_measures_text = wx.TextCtrl( self.excel_panel, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		self.specified_measures_text.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		self.specified_measures_text.SetToolTipString( u"不填：Test Row的每一行所有measure都测试\n填写：只测试填写的measure，逗号分隔每一个measure" )
		self.specified_measures_text.SetMinSize( wx.Size( 150,22 ) )
		
		excel_gbSizer.Add( self.specified_measures_text, wx.GBPosition( 2, 3 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		
		self.excel_panel.SetSizer( excel_gbSizer )
		self.excel_panel.Layout()
		power_stress_gbSizer.Add( self.excel_panel, wx.GBPosition( 2, 0 ), wx.GBSpan( 1, 1 ), wx.EXPAND |wx.ALL, 5 )
		
		self.channels_panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.channels_panel.SetBackgroundColour( wx.Colour( 5, 209, 169 ) )
		
		gbSizer4 = wx.GridBagSizer( 0, 0 )
		gbSizer4.SetFlexibleDirection( wx.BOTH )
		gbSizer4.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.ch1_checkbox = wx.CheckBox( self.channels_panel, wx.ID_ANY, u"CH1", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.ch1_checkbox.SetValue(True) 
		self.ch1_checkbox.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.ch1_checkbox.SetBackgroundColour( wx.Colour( 5, 209, 169 ) )
		
		gbSizer4.Add( self.ch1_checkbox, wx.GBPosition( 0, 0 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.ch2_checkbox = wx.CheckBox( self.channels_panel, wx.ID_ANY, u"CH2", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.ch2_checkbox.SetValue(True) 
		self.ch2_checkbox.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.ch2_checkbox.SetBackgroundColour( wx.Colour( 5, 209, 169 ) )
		
		gbSizer4.Add( self.ch2_checkbox, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.ch3_checkbox = wx.CheckBox( self.channels_panel, wx.ID_ANY, u"CH3", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.ch3_checkbox.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.ch3_checkbox.SetBackgroundColour( wx.Colour( 5, 209, 169 ) )
		
		gbSizer4.Add( self.ch3_checkbox, wx.GBPosition( 0, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.ch4_checkbox = wx.CheckBox( self.channels_panel, wx.ID_ANY, u"CH4", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.ch4_checkbox.SetFont( wx.Font( 18, 70, 90, 90, False, wx.EmptyString ) )
		self.ch4_checkbox.SetBackgroundColour( wx.Colour( 5, 209, 169 ) )
		
		gbSizer4.Add( self.ch4_checkbox, wx.GBPosition( 0, 3 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
		
		self.toggle_channels = wx.ToggleButton( self.channels_panel, wx.ID_ANY, u"Toggle Channels", wx.DefaultPosition, wx.DefaultSize, wx.SIMPLE_BORDER )
		self.toggle_channels.SetBackgroundColour( wx.Colour( 255, 128, 0 ) )
		
		gbSizer4.Add( self.toggle_channels, wx.GBPosition( 0, 4 ), wx.GBSpan( 1, 1 ), wx.LEFT, 50 )
		
		
		self.channels_panel.SetSizer( gbSizer4 )
		self.channels_panel.Layout()
		gbSizer4.Fit( self.channels_panel )
		power_stress_gbSizer.Add( self.channels_panel, wx.GBPosition( 3, 0 ), wx.GBSpan( 1, 1 ), wx.EXPAND |wx.ALL, 5 )
		
		self.button_panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		button_gbsizer = wx.GridBagSizer( 0, 0 )
		button_gbsizer.SetFlexibleDirection( wx.BOTH )
		button_gbsizer.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.Run_button = wx.Button( self.button_panel, wx.ID_ANY, u"Run", wx.DefaultPosition, wx.Size( 120,70 ), wx.BU_EXACTFIT )
		self.Run_button.SetFont( wx.Font( 28, 70, 90, 92, False, wx.EmptyString ) )
		self.Run_button.SetBackgroundColour( wx.Colour( 255, 0, 0 ) )
		
		button_gbsizer.Add( self.Run_button, wx.GBPosition( 0, 20 ), wx.GBSpan( 1, 2 ), wx.ALIGN_CENTER|wx.ALL, 30 )
		
		
		self.button_panel.SetSizer( button_gbsizer )
		self.button_panel.Layout()
		button_gbsizer.Fit( self.button_panel )
		power_stress_gbSizer.Add( self.button_panel, wx.GBPosition( 4, 0 ), wx.GBSpan( 1, 1 ), wx.EXPAND |wx.ALL, 5 )
		
		
		self.SetSizer( power_stress_gbSizer )
		self.Layout()
		
		self.Centre( wx.BOTH )
		
		# Connect Events
		self.excel_path_text.Bind( wx.EVT_TEXT_ENTER, self.GetExcelPath )
		self.toggle_channels.Bind( wx.EVT_TOGGLEBUTTON, self.ToggleChannels )
		self.Run_button.Bind( wx.EVT_BUTTON, self.OnRun )
	
	def __del__( self ):
		pass
	
	
	# Virtual event handlers, overide them in your derived class
	def GetExcelPath( self, event ):
		event.Skip()
	
	def ToggleChannels( self, event ):
		event.Skip()
	
	def OnRun( self, event ):
		event.Skip()
	

